﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RakutenProxy.Model.Rakuten
{
    public class ProductAttribute:IEquatable<RakutenProxy.Model.NopCommerce.ProductAttribute>
    {
        public ProductAttribute()
        {
            ProductAttributeValues = new List<ProductAttributeValue>();
            Product_ProductAttribute_Mappings = new List<Product_ProductAttribute_Mapping>();
        }
        
        public int ProductAttributeId { get; set; }
        public string Name { get; set; }
        public string IdentityName { get; set; }

        public virtual ICollection<ProductAttributeValue> ProductAttributeValues { get; set; }

        public virtual ICollection<Product_ProductAttribute_Mapping> Product_ProductAttribute_Mappings { get; set; }

        public bool Equals(NopCommerce.ProductAttribute other)
        {
            return other.Name.Equals(this.Name);
        }
    }

    public enum ControlType
    {
        /// <summary>
        /// Dropdown list
        /// </summary>
        DropdownList = 1,
        /// <summary>
        /// Radio list
        /// </summary>
        RadioList = 2,
        /// <summary>
        /// Checkboxes
        /// </summary>
        Checkboxes = 3,
        /// <summary>
        /// TextBox
        /// </summary>
        TextBox = 4,
        /// <summary>
        /// Multiline textbox
        /// </summary>
        MultilineTextbox = 10,
        /// <summary>
        /// Datepicker
        /// </summary>
        Datepicker = 20,
        /// <summary>
        /// File upload control
        /// </summary>
        FileUpload = 30,
        /// <summary>
        /// Color squares
        /// </summary>
        ColorSquares = 40,
    }
}
